/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package jp.co.irep.juten.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author toan_nguyen
 */
@Entity
@Table(name = "user_master_tbl")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "UserMasterTbl.findAll", query = "SELECT u FROM UserMasterTbl u"),
    @NamedQuery(name = "UserMasterTbl.findByUserNo", query = "SELECT u FROM UserMasterTbl u WHERE u.userNo = :userNo"),
    @NamedQuery(name = "UserMasterTbl.findByUserName1", query = "SELECT u FROM UserMasterTbl u WHERE u.userName1 = :userName1"),
    @NamedQuery(name = "UserMasterTbl.findByUserName2", query = "SELECT u FROM UserMasterTbl u WHERE u.userName2 = :userName2"),
    @NamedQuery(name = "UserMasterTbl.findByUserKname1", query = "SELECT u FROM UserMasterTbl u WHERE u.userKname1 = :userKname1"),
    @NamedQuery(name = "UserMasterTbl.findByUserKname2", query = "SELECT u FROM UserMasterTbl u WHERE u.userKname2 = :userKname2"),
    @NamedQuery(name = "UserMasterTbl.findByZip", query = "SELECT u FROM UserMasterTbl u WHERE u.zip = :zip"),
    @NamedQuery(name = "UserMasterTbl.findByKenName", query = "SELECT u FROM UserMasterTbl u WHERE u.kenName = :kenName"),
    @NamedQuery(name = "UserMasterTbl.findByAddress", query = "SELECT u FROM UserMasterTbl u WHERE u.address = :address"),
    @NamedQuery(name = "UserMasterTbl.findByUserMail", query = "SELECT u FROM UserMasterTbl u WHERE u.userMail = :userMail"),
    @NamedQuery(name = "UserMasterTbl.findByTel", query = "SELECT u FROM UserMasterTbl u WHERE u.tel = :tel"),
    @NamedQuery(name = "UserMasterTbl.findByAge", query = "SELECT u FROM UserMasterTbl u WHERE u.age = :age"),
    @NamedQuery(name = "UserMasterTbl.findByFukaFl", query = "SELECT u FROM UserMasterTbl u WHERE u.fukaFl = :fukaFl"),
    @NamedQuery(name = "UserMasterTbl.findByRegDate", query = "SELECT u FROM UserMasterTbl u WHERE u.regDate = :regDate"),
    @NamedQuery(name = "UserMasterTbl.findByBikou", query = "SELECT u FROM UserMasterTbl u WHERE u.bikou = :bikou"),
    @NamedQuery(name = "UserMasterTbl.findByUserName", query = "SELECT u FROM UserMasterTbl u WHERE u.userName = :userName"),
    @NamedQuery(name = "UserMasterTbl.findByUserKname", query = "SELECT u FROM UserMasterTbl u WHERE u.userKname = :userKname"),
    @NamedQuery(name = "UserMasterTbl.findBySex", query = "SELECT u FROM UserMasterTbl u WHERE u.sex = :sex"),
    @NamedQuery(name = "UserMasterTbl.findByMemo", query = "SELECT u FROM UserMasterTbl u WHERE u.memo = :memo"),
    @NamedQuery(name = "UserMasterTbl.findByBikou1", query = "SELECT u FROM UserMasterTbl u WHERE u.bikou1 = :bikou1"),
    @NamedQuery(name = "UserMasterTbl.findByBikou2", query = "SELECT u FROM UserMasterTbl u WHERE u.bikou2 = :bikou2"),
    @NamedQuery(name = "UserMasterTbl.findByTerminal", query = "SELECT u FROM UserMasterTbl u WHERE u.terminal = :terminal"),
    @NamedQuery(name = "UserMasterTbl.findByUserType", query = "SELECT u FROM UserMasterTbl u WHERE u.userType = :userType")})
public class UserMasterTbl implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "user_no")
    private Integer userNo;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 32)
    @Column(name = "user_name1")
    private String userName1;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 32)
    @Column(name = "user_name2")
    private String userName2;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 32)
    @Column(name = "user_kname1")
    private String userKname1;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 32)
    @Column(name = "user_kname2")
    private String userKname2;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 8)
    @Column(name = "zip")
    private String zip;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 32)
    @Column(name = "ken_name")
    private String kenName;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "address")
    private String address;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "user_mail")
    private String userMail;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 15)
    @Column(name = "tel")
    private String tel;
    @Basic(optional = false)
    @NotNull
    @Column(name = "age")
    private short age;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fuka_fl")
    private short fukaFl;
    @Basic(optional = false)
    @NotNull
    @Column(name = "reg_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date regDate;
    @Size(max = 2147483647)
    @Column(name = "bikou")
    private String bikou;
    @Size(max = 100)
    @Column(name = "user_name")
    private String userName;
    @Size(max = 100)
    @Column(name = "user_kname")
    private String userKname;
    @Basic(optional = false)
    @NotNull
    @Column(name = "sex")
    private int sex;
    @Size(max = 2147483647)
    @Column(name = "memo")
    private String memo;
    @Size(max = 2147483647)
    @Column(name = "bikou1")
    private String bikou1;
    @Size(max = 2147483647)
    @Column(name = "bikou2")
    private String bikou2;
    @Basic(optional = false)
    @NotNull
    @Column(name = "terminal")
    private int terminal;
    @Column(name = "user_type")
    private Short userType;

    public UserMasterTbl() {
    }

    public UserMasterTbl(Integer userNo) {
        this.userNo = userNo;
    }

    public UserMasterTbl(Integer userNo, String userName1, String userName2, String userKname1, String userKname2, String zip, String kenName, String address, String userMail, String tel, short age, short fukaFl, Date regDate, int sex, int terminal) {
        this.userNo = userNo;
        this.userName1 = userName1;
        this.userName2 = userName2;
        this.userKname1 = userKname1;
        this.userKname2 = userKname2;
        this.zip = zip;
        this.kenName = kenName;
        this.address = address;
        this.userMail = userMail;
        this.tel = tel;
        this.age = age;
        this.fukaFl = fukaFl;
        this.regDate = regDate;
        this.sex = sex;
        this.terminal = terminal;
    }

    public Integer getUserNo() {
        return userNo;
    }

    public void setUserNo(Integer userNo) {
        this.userNo = userNo;
    }

    public String getUserName1() {
        return userName1;
    }

    public void setUserName1(String userName1) {
        this.userName1 = userName1;
    }

    public String getUserName2() {
        return userName2;
    }

    public void setUserName2(String userName2) {
        this.userName2 = userName2;
    }

    public String getUserKname1() {
        return userKname1;
    }

    public void setUserKname1(String userKname1) {
        this.userKname1 = userKname1;
    }

    public String getUserKname2() {
        return userKname2;
    }

    public void setUserKname2(String userKname2) {
        this.userKname2 = userKname2;
    }

    public String getZip() {
        return zip;
    }

    public void setZip(String zip) {
        this.zip = zip;
    }

    public String getKenName() {
        return kenName;
    }

    public void setKenName(String kenName) {
        this.kenName = kenName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getUserMail() {
        return userMail;
    }

    public void setUserMail(String userMail) {
        this.userMail = userMail;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public short getAge() {
        return age;
    }

    public void setAge(short age) {
        this.age = age;
    }

    public short getFukaFl() {
        return fukaFl;
    }

    public void setFukaFl(short fukaFl) {
        this.fukaFl = fukaFl;
    }

    public Date getRegDate() {
        return regDate;
    }

    public void setRegDate(Date regDate) {
        this.regDate = regDate;
    }

    public String getBikou() {
        return bikou;
    }

    public void setBikou(String bikou) {
        this.bikou = bikou;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserKname() {
        return userKname;
    }

    public void setUserKname(String userKname) {
        this.userKname = userKname;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public String getBikou1() {
        return bikou1;
    }

    public void setBikou1(String bikou1) {
        this.bikou1 = bikou1;
    }

    public String getBikou2() {
        return bikou2;
    }

    public void setBikou2(String bikou2) {
        this.bikou2 = bikou2;
    }

    public int getTerminal() {
        return terminal;
    }

    public void setTerminal(int terminal) {
        this.terminal = terminal;
    }

    public Short getUserType() {
        return userType;
    }

    public void setUserType(Short userType) {
        this.userType = userType;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (userNo != null ? userNo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof UserMasterTbl)) {
            return false;
        }
        UserMasterTbl other = (UserMasterTbl) object;
        if ((this.userNo == null && other.userNo != null) || (this.userNo != null && !this.userNo.equals(other.userNo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "jp.co.irep.tech.juten.jpa.entity.UserMasterTbl[ userNo=" + userNo + " ]";
    }
    
}
